package com.jdk.demo.thread.reentrantLock;

import java.util.concurrent.locks.ReentrantLock;

public class Executor implements Runnable {
	
	private ReentrantLock lock;

	public Executor(ReentrantLock lock) {
		super();
		this.lock = lock;
	}

	@Override
	public void run() {
		lock.lock();
		try {
			Thread.sleep(1000);
		} catch (Exception e) {
			e.printStackTrace();
		}
		lock.unlock();
	}

}
